package com.sailorj.mapper;

import com.sailorj.entity.TbWork;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface TbWorkMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(TbWork record);

    int insertSelective(TbWork record);

    TbWork selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(TbWork record);

    int updateByPrimaryKey(TbWork record);

    @Select("select * from tb_work where is_delete = 0 limit #{page},#{size}")
    List<TbWork> selectWorkList(@Param("page") Integer page, @Param("size")Integer size);

    @Select("select * from tb_work where work_time = #{seachtime1} and  is_delete = 0 limit #{page},#{size}")
    List<TbWork> getWorkListByTime(@Param("page") Integer page, @Param("size")Integer size,@Param("seachtime1")String seachtime1);



    @Select("select count(*) from tb_work")
    Long getTotal();
}